﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Aj.Core;

public partial class uc_joinmenu : System.Web.UI.UserControl
{
    protected DataSet ds = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string key = "/cache/menu/" + Utility.JoinCid;
            if (Function.GetCacheObject(key) == null)
            {
                ds = CustomQuery.LanMuInfo_GetLanMuInfoByPId(Utility.JoinCid);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    Function.AddCacheObject(key, ds, DateTime.Now.AddHours(12));
                }
            }
            else
            {
                ds = Function.GetCacheObject(key) as DataSet;
            }
        }
        catch (Exception ex)
        {
            Function.WriteErrorLog(ex);
        }
    }
}